//
//  BasicViewController.m
//  IComic_Stone
//
//  Created by dlios on 15-3-21.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "BasicViewController.h"
#import "ClassifyViewController.h"
#import "RankingViewController.h"
#import "RecommendationViewController.h"
#import "SpecialTopicViewController.h"
#import "UIButton+button.h"


@interface BasicViewController ()

@end

@implementation BasicViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.view.backgroundColor = [UIColor blackColor];
    
    UIButton *classBut = [UIButton buttonWithTitle:@"分类" frame:CGRectMake(0, 64, 100, 20) target:self action:@selector(butAction:)];
    [self.view addSubview:classBut];
    
    
    ClassifyViewController *class = [[ClassifyViewController alloc] init];
    RankingViewController *ranking = [[RankingViewController alloc] init];
    RecommendationViewController *recommendation = [[RecommendationViewController alloc] init];
    SpecialTopicViewController *specialTopic = [[SpecialTopicViewController alloc] init];
    
    [self.view addSubview:class.view];
    [self addChildViewController:class];
    [self.view addSubview:ranking.view];
    [self addChildViewController:ranking];
    [self.view addSubview:recommendation.view];
    [self addChildViewController:recommendation];
    [self.view addSubview:specialTopic.view];
    [self addChildViewController:specialTopic];


    
    //获取跟视图控制器
//    UIViewController *rootVC = [[[UIApplication sharedApplication] keyWindow] rootViewController];
    
    
    [class release];
    [ranking release];
    [recommendation release];
    [specialTopic release];
    
}

- (void)butAction:(UIButton *)button
{

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
